<?php

/**
 * 新闻
 */

namespace app\api\controller\course;

use app\api\controller\Common;

class CourseCategory extends Common
{
    protected $data;
    public function initialize()
    {
        parent::initialize();
        $this->data = $this->request->except(['sign', 'accessKey', 'token']);
    }

    public function list()
    {  
        $where = ['del'=>0];
        $list = db('course_category')
            ->field('id, title')
            ->where($where)->order('sort', 'desc')->select();
        return $this->showSuccess('课程分类', $list);
    }
    
    
}
